3.136 \(\int \frac{\sin ^2(a+b x^n)}{x} \, dx\)

Optimal. Leaf size=43 \[ -\frac{\cos (2 a) \text{CosIntegral}\left (2 b x^n\right )}{2 n}+\frac{\sin (2 a) \text{Si}\left (2 b x^n\right )}{2 n}+\frac{\log (x)}{2} \]

[Out]

-(Cos[2*a]*CosIntegral[2*b*x^n])/(2*n) + Log[x]/2 + (Sin[2*a]*SinIntegral[2*b*x^n])/(2*n)

________________________________________________________________________________________

Rubi [A]  time = 0.0614448, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {3425, 3378, 3376, 3375} \[ -\frac{\cos (2 a) \text{CosIntegral}\left (2 b x^n\right )}{2 n}+\frac{\sin (2 a) \text{Si}\left (2 b x^n\right )}{2 n}+\frac{\log (x)}{2} \]

Antiderivative was successfully verified.

[In]

Int[Sin[a + b*x^n]^2/x,x]

[Out]

-(Cos[2*a]*CosIntegral[2*b*x^n])/(2*n) + Log[x]/2 + (Sin[2*a]*SinIntegral[2*b*x^n])/(2*n)

Rule 3425

Int[((e_.)*(x_))^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*(x_)^(n_)])^(p_), x_Symbol] :> Int[ExpandTrigReduce[(e
*x)^m, (a + b*Sin[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]

Rule 3378

Int[Cos[(c_) + (d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Dist[Cos[c], Int[Cos[d*x^n]/x, x], x] - Dist[Sin[c], Int[Si
n[d*x^n]/x, x], x] /; FreeQ[{c, d, n}, x]

Rule 3376

Int[Cos[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[CosIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3375

Int[Sin[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[SinIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rubi steps

\begin{align*} \int \frac{\sin ^2\left (a+b x^n\right )}{x} \, dx &=\int \left (\frac{1}{2 x}-\frac{\cos \left (2 a+2 b x^n\right )}{2 x}\right ) \, dx\\ &=\frac{\log (x)}{2}-\frac{1}{2} \int \frac{\cos \left (2 a+2 b x^n\right )}{x} \, dx\\ &=\frac{\log (x)}{2}-\frac{1}{2} \cos (2 a) \int \frac{\cos \left (2 b x^n\right )}{x} \, dx+\frac{1}{2} \sin (2 a) \int \frac{\sin \left (2 b x^n\right )}{x} \, dx\\ &=-\frac{\cos (2 a) \text{Ci}\left (2 b x^n\right )}{2 n}+\frac{\log (x)}{2}+\frac{\sin (2 a) \text{Si}\left (2 b x^n\right )}{2 n}\\ \end{align*}

Mathematica [A]  time = 0.0767523, size = 37, normalized size = 0.86 \[ \frac{-\cos (2 a) \text{CosIntegral}\left (2 b x^n\right )+\sin (2 a) \text{Si}\left (2 b x^n\right )+n \log (x)}{2 n} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + b*x^n]^2/x,x]

[Out]

(-(Cos[2*a]*CosIntegral[2*b*x^n]) + n*Log[x] + Sin[2*a]*SinIntegral[2*b*x^n])/(2*n)

________________________________________________________________________________________

Maple [A]  time = 0.007, size = 45, normalized size = 1.1 \begin{align*}{\frac{\ln \left ( b{x}^{n} \right ) }{2\,n}}+{\frac{{\it Si} \left ( 2\,b{x}^{n} \right ) \sin \left ( 2\,a \right ) }{2\,n}}-{\frac{{\it Ci} \left ( 2\,b{x}^{n} \right ) \cos \left ( 2\,a \right ) }{2\,n}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a+b*x^n)^2/x,x)

[Out]

1/2/n*ln(b*x^n)+1/2*Si(2*b*x^n)*sin(2*a)/n-1/2*Ci(2*b*x^n)*cos(2*a)/n

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: IndexError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*x^n)^2/x,x, algorithm="maxima")

[Out]

Exception raised: IndexError

________________________________________________________________________________________

Fricas [A]  time = 1.71182, size = 166, normalized size = 3.86 \begin{align*} -\frac{\cos \left (2 \, a\right ) \operatorname{Ci}\left (2 \, b x^{n}\right ) + \cos \left (2 \, a\right ) \operatorname{Ci}\left (-2 \, b x^{n}\right ) - 2 \, n \log \left (x\right ) - 2 \, \sin \left (2 \, a\right ) \operatorname{Si}\left (2 \, b x^{n}\right )}{4 \, n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*x^n)^2/x,x, algorithm="fricas")

[Out]

-1/4*(cos(2*a)*cos_integral(2*b*x^n) + cos(2*a)*cos_integral(-2*b*x^n) - 2*n*log(x) - 2*sin(2*a)*sin_integral(
2*b*x^n))/n

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sin ^{2}{\left (a + b x^{n} \right )}}{x}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*x**n)**2/x,x)

[Out]

Integral(sin(a + b*x**n)**2/x, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sin \left (b x^{n} + a\right )^{2}}{x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*x^n)^2/x,x, algorithm="giac")

[Out]

integrate(sin(b*x^n + a)^2/x, x)